<?
require_once 'config.php';
$blo_id = getValue('iPro','int','GET',0);
$templateBlog = new TemplateBlog();
$blo_info = $templateBlog->blo_detail($blo_id);
if(!$blo_info) redirect('/');
$update = new db_execute("UPDATE blog SET blo_views = blo_views + 1 WHERE blo_id =".$blo_id)
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="vi" lang="vi" xmlns:og="http://ogp.me/ns#" xmlns:fb="">
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <link type="image/x-icon" href="/favicon.ico" rel="icon" />
   
   <title><?=$blo_info['blo_title']?></title>
   <meta name="description" content=""/>
   <meta name="keywords" content=""/>
   <meta name="AUTHOR" content="Sudo.vn" />
   <meta name="COPYRIGHT" content="Sudo.vn" />
   <meta name="ROBOTS" content="INDEX, FOLLOW" />
   <meta name="RATING" content="GENERAL" />
   <!-- css -->   
   <link rel="stylesheet" type="text/css" href="<?=TEMPLATE_PATH?>css/jquery-ui.css" media='all'/>
   <link rel="stylesheet" type="text/css" href="<?=TEMPLATE_PATH?>css/home.css" media='all'/>
   <link rel="stylesheet" type="text/css" href="<?=TEMPLATE_PATH?>css/service.css" media='all'/>
   
   <!-- js -->
   <script type="text/javascript" src="<?=TEMPLATE_PATH?>js/jquery-1.9.0.min.js"></script>
   <script type="text/javascript" src="<?=TEMPLATE_PATH?>js/common.js"></script>
</head>
<body> 
   <? include("../social_plugins/facebook.php");?>
   <div class="global_container">
      <? include('view/common/vic_header.php')?>
      <div class="content_wrap">
         <div class="cumbs_wrap">
            <div class="crumbs width">
               <ul>              
            		<li><a href="/">Trang chủ </a> &nbsp;>&nbsp; </li>
                  <li><a href="/blog.html">blog  </a> &nbsp;>&nbsp;</li> 
            		<li><a href="<?=generate_blog_detail_url($blo_info)?>"><?=$blo_info['blo_title']?> </a> </li>
                  
            	</ul>
               <div class="clear"></div>
            </div>
         </div>
         <div class="content_inner width">
            <div class="content_left">
               <? include('view/common/vic_post_new.php')?>                   
            </div>
            <div class="content_right">
               <div class="services_wrap">              
                  <p class="post_title"><?=$blo_info['blo_title']?> </p>
                  <p class="post_date"><?=getDateTime(1,1,1,1,'',$blo_info['blo_date'])?></p>
                  <div class="post_description">
                     <b><?=$blo_info['blo_summary']?></b>
                  </div>
                  <div class="post_detail">
                     <?=$blo_info['blo_detail']?>
                  </div>
               </div>
               <div class="comments_main_item comments_main_fb" style="z-index: 1000;position: relative">
                 <div class="fb-comments" data-href="<?=DOMAIN.$_SERVER['REQUEST_URI']?>" data-colorscheme="light" data-numposts="5" data-width="723"></div>
               </div>
            </div>
         </div>
         <div class="clear"></div>
      </div>
      <div class="clear"></div>
      <?include('view/common/vic_footer.php')?>
   </div>
</body>
</html>
<script>
$(document).ready(function(){
   $(window).scroll(function(){
      var y = $(window).scrollTop();    
      
      var elementOffset = $('.post_new').offset().top;
      if(y <= 233){
         $('.post_new').removeClass('post_new_fixed')         
      }
      if(y > elementOffset){
         $('.post_new').addClass('post_new_fixed');         
      } ;
      if(y>500) $('.post_new').css({'top':'32px'});
      else{ $('.post_new').css({'top':'-20px'})}
   });
})
</script>